package com.woniu.command.regionCommand;

import com.woniu.command.Command;
import com.woniu.command.handler.RegionCommandHandler;
import com.woniu.utils.ApplicationContextHolder;

public class DeleteRegionCommand implements Command<Long,Integer> {

    private RegionCommandHandler handler;
    public DeleteRegionCommand(){
        this.handler = ApplicationContextHolder.getApplicationContext()
                .getBean(RegionCommandHandler.class);
    }
    @Override
    public Integer  execute(Long id) {
        return handler.deleteRegionById(id);
    }
}
